<?php if (isset($slots)): ?>
<div class="row-fluid">
    <div class="span12">
        <table cellpadding="0" cellspacing="0" border="0" class="responsive dynamicTable display table table-bordered" width="100%">
            <thead>
                <tr>
                    <th>
                        <span>Tên</span>
                    </th>
                     <th>
                        <span>Danh mục cha</span>
                    </th>
                    <th>
                        <span>Vị trí</span>
                    </th>
                    <th>
                        <span>Thứ tự</span>
                    </th>
                    <th>
                        <span>Danh mục SP</span>
                    </th>
                    <th>
                        <span>Tác vụ</span>
                    </th>
                </tr>
            </thead>
            <tbody>
              	<?php foreach ($slots as $slot): ?>
                <tr>
                    <td style="text-align:center"><?php for ($i = 0; $i < $slot['lshift']; $i++) echo "- " ?><?php echo $slot['display_name'] ?></td>
            		<td style="text-align:center"><?php echo ($slot['parent_name'])?$slot['parent_name']:"-" ?></td>
                    <td style="text-align:center"><?php echo Slot::$positions[$slot['display_position']] ?></td>
                    <td style="text-align:center"><?php echo $slot['display_order'] ?></td>
                    <td><?php echo $slot['category_name'] ?></td>
                    <td style="text-align:center"><a href="<?php echo url_for('@slot_edit?slot_id='.$slot['id']) ?>"><span class="icon12 icomoon-icon-pencil"></span></a><a href="<?php echo url_for('@slot_delete?slot_id='.$slot['id']) ?>"><span class="icon12 icomoon-icon-remove"></span></a></td>
                </tr>
                <?php endforeach ?>
            </tbody>
        </table>
	</div>
</div>
<?php endif ?>